﻿//===============================================================================
// Apolineo Patterns & Practices LeanEngine Framework
//===============================================================================
// Copyright © Apolineo Desenvolvimento de Sistemas Ltda.  All rights reserved.
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
// FITNESS FOR A PARTICULAR PURPOSE.
//===============================================================================

using System;
using System.Windows.Forms;

namespace LeanEngine.SalesConcept.Windows
{
    //Formulário que contem a lógica de implementação da funcionalidade de pesquisa
    //de produtos e utiliza o user control de manutenção e o de pesquisa criados
    public partial class FormSearchProduct : Form
    {
        public FormSearchProduct()
        {
            InitializeComponent();
        }

        private void searchControlOfProduct1_AddNewProduct()
        {
            using (var form = new FormMaintenanceProduct())
            {
                form.ShowDialog();
            }
        }

        private void searchControlOfProduct1_UpdateProduct(LeanEngine.SalesConcept.Entity.Product obj)
        {
            using (var form = new FormMaintenanceProduct())
            {
                form.SetControlsValues(obj);
                form.ShowDialog();
            }
        }
    }
}
